package com.dcw.lixb.designmode.abstract_factory;

/**
 * @author lixiaobin
 * @date 2020-07-16 17:02:45
 * @desc 描述信息
 */
public class FactoryProducer {
    public static final int TYPE_COLOR = 0;
    public static final int TYPE_SHAPE = 1;

    public static AbsFactory createFactory(int type) {
        switch (type) {
            case TYPE_COLOR:
                return new ColorFactory();
            case TYPE_SHAPE:
                return new ShapeFactory();
            default:
                return null;
        }
    }
}
